//
//  UIElementGenerator.m
//  DailyRecord
//
//  Created by Gin on 2022/3/24.
//

#import "UIElementGenerator.h"

@implementation UIElementGenerator

+ (UITableView *)generateTableViewWithStyle:(UITableViewStyle)style{
    UITableView *tb = [[UITableView alloc] initWithFrame:CGRectZero style:style];
    tb.estimatedSectionHeaderHeight = 0.0;
    tb.contentInset = UIEdgeInsetsMake(-30, 0, 0, 0);
    tb.showsVerticalScrollIndicator = NO;
    tb.separatorInset = UIEdgeInsetsZero;
    tb.tableFooterView = [UIView new];
    if (@available(iOS 15.0, *)) {
        tb.sectionHeaderTopPadding = 0;
    }
    return tb;
}

@end
